/*
* Copyright (C) 2020 ~ 2024 chaigec All Rights Reserved.
*
* Author:     chaigec <chaigec@163.com>
* Maintainer: chaigec <chaigec@163.com>

 * Use of this source code is governed by MIT license that can be found in the
 * LICENSE file in the root of the source tree. All contributing project authors
 * may be found in the AUTHORS file in the root of the source tree.
*/

//http://mirrors.nju.edu.cn/rfc/beta/errata/rfc2616.html
#ifndef MK_HTTTP_REQUEST_HEADER_H
#define MK_HTTTP_REQUEST_HEADER_H
#include "MkHttpMessage.h"
#include "MkHttpUtil.h"
#include "MkHttpUri.h"

class MkApi CMkHttpRequest : public CMkHttpMessage
{
public:
    CMkHttpRequest();
    virtual ~CMkHttpRequest();
    const MkHttpMethod& GetMethod() const { return m_Method; }
    const CMkHttpUri& GetUri() const { return m_Uri; }

    void SetMethod(const MkHttpMethod& Method) { m_Method = Method; }
    Uint32 SetUri(const MkString& Uri);
    void SetUri(const CMkHttpUri& Uri);

    void Release();
protected:
    Uint32 OnParseHeaderLine(const MkString& HeaderLine) override;
    Uint32 GetHeaderLine(MkString& HeaderLine) override;
private:
    MkHttpMethod                        m_Method;
    CMkHttpUri                          m_Uri;
};


#endif